package com.sixkey.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sixkey.entity.Log;
import com.sixkey.entity.User;
import com.sixkey.mapper.LogMapper;
import com.sixkey.service.LogService;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2023-09-09
 */
@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, Log> implements LogService {
    @Override
    public Page<Log> queryList(Integer pageNo, Integer pageSize) {
        Page<Log> pageInfo = new Page<>(pageNo, pageSize);
        LambdaQueryWrapper<Log> wrapper = new LambdaQueryWrapper<>();
        //添加排序条件
        wrapper.orderByDesc(Log::getCreateTime);
        Page<Log> userPage = this.page(pageInfo, wrapper);
        return userPage;
    }
}
